<template>
  <div>
      
      <van-search
        v-model="value"
        shape="round"
        background="#fff"
        placeholder="请输入搜索关键词"
      />
     
    <van-tabs route v-model="active" swipeable>
      <van-tab :to="'/home/'+item.name" v-for="(item,index) in list" :key='index' :title="item.title" @click="getHandle">
      </van-tab>
    </van-tabs>

    
    <router-view></router-view>
  </div>

</template>

<script>
   
export default {
  data(){
    return{
      value:'',
      active:0,
      list:[
        {
          id:1,
          title:'首页',
          name:'index'
        },
        {
          id:2,
          title:'极速免税',
          name:'speed'
        },
        {
          id:3,
          title:'母婴',
          name:'mom'
        },
        {
          id:4,
          title:'轻奢',
          name:'qingshe'
        },
        {
          id:5,
          title:'名品特卖',
          name:'mingpin'
        }

      ]
    }
  },
  beforeRouteUpdate(to,from,next) {
    next()
  },
  methods:{
    onClick(){

    },
    getHandle(){
      console.log(111);
    }
  }
}
</script>

<style  scoped>
.top{
  width:100%;
}
.top > img{
  width: 100%;
  height: 130px;
  margin: 2px 0px;
}
.center{
  width: 100%;
  margin: 2px 0px;
  display: flex;

}
.center > .img{
  width: 130px;
  margin-right: 2px;
}
.center > .img>img{
  width: 130px;
}
.text{
  color: #333;
  font-size: 13px;
  line-height: 17px;
  max-height: 51px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  margin-bottom: 5px;
}

</style>


